<div class="content">
	<h2>{$smarty.const.CONFIGURATION|htmlentities:3:'UTF-8'}</h2>
	
	<p>{$smarty.const.CONFIGURATION_TEXT|htmlentities:3:'UTF-8'}</p>
	
	<script>
		$(document).ready(function() {
			// remote, email, url, date, dateISO, digits, creditcard, equalTo, accept, maxlength, minlength, rangelength, range, max, min
			$.validator.messages["required"] = "{$smarty.const.VALIDATOR_REQUIRED|htmlentities:3:'UTF-8'}";
			$.validator.messages["number"] = "{$smarty.const.VALIDATOR_NUMBER|htmlentities:3:'UTF-8'}";
			$.validator.messages["digits"] = "{$smarty.const.VALIDATOR_DIGITS|htmlentities:3:'UTF-8'}";
			$.validator.messages["email"] = "{$smarty.const.VALIDATOR_EMAIL|htmlentities:3:'UTF-8'}";
			$.validator.messages["url"] = "{$smarty.const.VALIDATOR_URL|htmlentities:3:'UTF-8'}";
			$.validator.messages["date"] = "{$smarty.const.VALIDATOR_DATE|htmlentities:3:'UTF-8'}";
			$.validator.messages["accept"] = "{$smarty.const.VALIDATOR_ACCEPT_JPG|htmlentities:3:'UTF-8'}";
			$("#form").validate();
			$("#form").valid();
			$("#dbhost").focus();
		});
	</script>
	
	<form id="form" method="POST">
		<h2>{$smarty.const.DATABASE|htmlentities:3:'UTF-8'}</h2>
			
		<table>
			<tr>
				<td style="width: 150px;">{$smarty.const.HOST|htmlentities:3:'UTF-8'}:</td>
				<td><input name="dbhost" id="dbhost" type="text" class="required" style="width: 200px;" value="{$dbhost|htmlentities:3:'UTF-8'}"></td>
			</tr>
			<tr>
				<td>{$smarty.const.PORT|htmlentities:3:'UTF-8'}:</td>
				<td><input name="dbport" type="text" class="required digits" style="width: 50px;" value="{$dbport|htmlentities:3:'UTF-8'}"></td>
			</tr>
			<tr>
				<td>{$smarty.const.DATABASE|htmlentities:3:'UTF-8'}:</td>
				<td><input name="dbname" type="text" class="required" style="width: 200px;" value="{$dbname|htmlentities:3:'UTF-8'}"></td>
			</tr>
			<tr>
				<td>{$smarty.const.USER_NAME|htmlentities:3:'UTF-8'}:</td>
				<td><input name="dbuser" type="text" class="required" style="width: 200px;" value="{$dbuser|htmlentities:3:'UTF-8'}"></td>
			</tr>
			<tr>
				<td>{$smarty.const.PASSWORD|htmlentities:3:'UTF-8'}:</td>
				<td><input name="dbpass" type="password" class="" style="width: 200px;" value="{$dbpass|htmlentities:3:'UTF-8'}"></td>
			</tr>
		</table>
		
		<p>&nbsp;</p>
	
		<h2>{$smarty.const.WEBSITE|htmlentities:3:'UTF-8'}</h2>
		
		<table>
			<tr>
				<td style="width: 150px;">{$smarty.const.URL|htmlentities:3:'UTF-8'}:</td>
				<td>
					{$baseurl|htmlentities:3:'UTF-8'}/ <input name="url" type="text" class="required" style="width: 120px;" value="{$url|htmlentities:3:'UTF-8'}"> /
				</td>
			</tr>
			<tr>
				<td>{$smarty.const.TEMPLATE|htmlentities:3:'UTF-8'}:</td>
				<td>
					<select name="template" class="required" style="width: 205px;">
						{section loop=$templates name=t}
						<option value="{$templates[t]|htmlentities:3:'UTF-8'}"{if $template == $templates[t]} selected{/if}>{$templates[t]|htmlentities:3:'UTF-8'}</option>
						{/section}
					</select>
				</td>
			</tr>
			<tr>
				<td>{$smarty.const.LANGUAGE|htmlentities:3:'UTF-8'}:</td>
				<td>
					<select name="defaultlanguage" class="required" style="width: 205px;">
						{foreach from=$languages key=name item=code}
						<option value="{$code|htmlentities:3:'UTF-8'}"{if $language == $code} selected{/if}>{$name|htmlentities:3:'UTF-8'}</option>
						{/foreach}
					</select>
				</td>
			</tr>
			<tr>
				<td style="width: 150px">&nbsp;</td>
				<td>
					<input type="checkbox" name="guestview" id="guestview" value="1"{if $guestview} checked{/if}> <label for="guestview">{$smarty.const.GUEST_USERS_CAN_SEE_COLLECTION|htmlentities:3:'UTF-8'}</label>
				</td>
			</tr>
		</table>
	
		{if isset($error)}<p class="error">{$error|htmlentities:3:'UTF-8'}</p>{/if}
		<input type="submit" name="submit" value="{$smarty.const.NEXT|htmlentities:3:'UTF-8'}"> 
	</form>
</div>